package com.mtsmda.bookjava7.chapter11.generics;

import java.util.ArrayList;
import java.util.List;

import com.mtsmda.bookjava7.chapter11.generics.animals.Animal;
import com.mtsmda.bookjava7.chapter11.generics.animals.AziyaDog;
import com.mtsmda.bookjava7.chapter11.generics.animals.Bird;
import com.mtsmda.bookjava7.chapter11.generics.animals.Cat;
import com.mtsmda.bookjava7.chapter11.generics.animals.Dog;
import com.mtsmda.bookjava7.chapter11.generics.animals.JapanAziyaDog;

public class GenericDemo {

	public static void main(String[] args) {
		// List<Animal> animals = new ArrayList<Dog>();
		List<Animal> animals = new ArrayList<Animal>();
		animals.add(new Cat());
		animals.add(new Dog());
		animals.add(new Bird());
		animals.add(new AziyaDog());
		animals.add(new JapanAziyaDog());

		addAnimals(new ArrayList<Bird>());
		addAnimals(new ArrayList<Dog>());
		addAnimals(new ArrayList<JapanAziyaDog>());

		addDogs(new ArrayList<Dog>());
		addDogs(new ArrayList<AziyaDog>());
		addDogs(new ArrayList<JapanAziyaDog>());
		// addDogs(new ArrayList<Bird>());
		// addDogs(new ArrayList<Cat>());

		addAziyaDog(new ArrayList<AziyaDog>());
		// addAziyaDog(new ArrayList<JapanAziyaDog>());
		addAziyaDog(new ArrayList<Dog>());
		addAziyaDog(new ArrayList<Animal>());

		doInsert(new ArrayList<Integer>());
		doInsert(new ArrayList<Dog>());
		doInsert(new ArrayList<String>());

		doObject(new ArrayList<Object>());
		// doObject(new ArrayList<Integer>());
	}

	public static void doObject(List<Object> insert) {
		insert.add(new String());
		insert.add(new Dog());
	}

	public static void doInsert(List<?> insert) {
		// insert.add(new String());
	}

	public static void addAziyaDog(List<? super AziyaDog> dogs) {

	}

	public static void addAnimals(List<? extends Animal> animals) {

	}

	public static void addDogs(List<? extends Dog> dogs) {

	}

}